package cn.darkhorse.alarm.pojo;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author maoguanjun
 * @since 2023-04-07
 */
@Getter
@Setter
  @TableName("alarm_parameter_settings")
@ApiModel(value = "AlarmParameterSettings对象", description = "")
public class AlarmParameterSettings implements Serializable {

    private static final long serialVersionUID = 1L;

      @ApiModelProperty("主键")
        @TableId(value = "id", type = IdType.AUTO)
      private Long id;

      @ApiModelProperty("mes系统中设备id")
      private Long deviceId;

    @ApiModelProperty("设备硬件对应id")
    private String gatewayDeviceId;

      @ApiModelProperty("对应信控pointId")
      private String pointId;

      @ApiModelProperty("对应信控pointName")
      private String pointName;

      @ApiModelProperty("自定义参数名称")
      private String customParameterName;

      @ApiModelProperty("参数类型：0/开关量 1/变量")
      private Integer parameterType;

      @ApiModelProperty("是否报警： 0/否 1/是")
      private Boolean alarm;

      @ApiModelProperty("报警类型：0/fasle 1/true 2/变化 3/限值报警 4/连续报警")
      private Integer alarmType;

      @ApiModelProperty("报警参数设置，此字段为一个json字符串	开关量：[{value:true,msg:\"报警文本\"}]，[{value:\"true--false\":msg:\"报警文本\"},{value:\"false--true\":msg:\"报警文本\"}]	变量：	限值报警[{maxValue:\"\",msg:\"报警文本\"},{minValue:\"\",msg:\"报警文本\"}]	连续报警[{value:\"\",msg:\"报警文本\"},{value:\"\",msg:\"报警文本\"},{value:\"\",msg:\"报警文本\"},{value:\"\",msg:\"报警文本\"}]")
      private String alarmMessage;

      @ApiModelProperty("报警频率：0/实时报警 1/间隔报警")
      private Integer alarmFrequency;

      @ApiModelProperty("间隔频率，单位 秒")
      private Integer intervalTime;

      @ApiModelProperty("备注")
      private String remarks;

      @ApiModelProperty("显示顺序，开关量和变量分别排序")
      private Integer showOrder;

      private Integer display;

      private Long pointTableId;

      private String fieldName;


      private Integer sendToGateway;

      @TableField(updateStrategy = FieldStrategy.IGNORED)
      private Long instructId;

}
